﻿using B.S.Sterilizationcenter.Domain.zyy;
using B.S.Sterilizationcenter.ErrorCode;
using B.S.Sterilizationcenter.Read.API.Application;
using B.S.Sterilizationcenter.Read.API.Application.Command;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Reflection.Metadata;

namespace B.S.Sterilizationcenter.Read.API.Controllers.ZYY.Shelfdictionarys
{
    [Route("api/[controller]/[action]")]
    [ApiController]

    public class ShelfdictionaryController : ControllerBase
    {/// <summary>
     ///  货架字典表
     /// </summary>
        private readonly IMediator med;

        public ShelfdictionaryController(IMediator med)
        {
            this.med = med;
        }
        /// <summary>
        ///  货架字典列表
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<ApiResult<List<Shelfdictionary>>> GetShelfdictionary([FromQuery] GetShelfdictionarycommand request, CancellationToken cancellationToken)
        {
            return med.Send(request, cancellationToken);
        }
        [HttpGet]
        public Task<ApiResult<List<Shelfdictionary>>> FanShelfdic([FromQuery] FanShelfdictionarycommand request, CancellationToken cancellationToken)
        {
            return med.Send(request, cancellationToken);
        }
        [HttpGet]
        public Task<ApiResult<List<Shelfdictionary>>> XiaSgelf([FromQuery] XiaShelfdictionaryCommand request, CancellationToken cancellationToken)
        {
            return med.Send(request, cancellationToken);
        }
    }
}
